package slm.games.tris;

public class Player {
	
	static final int CROSS = 1;
    static final int CIRCLE=  2;
	
	private String nickname;
	private int player_symbol;
	private int winner_comb_index = -1;
	private int move_sound_id = -1;
	
	public int getWinner_comb_index() {
		return winner_comb_index;
	}

	public void setWinner_comb_index(int winner_comb_index) {
		this.winner_comb_index = winner_comb_index;
	}

	public void setSoundID(int sound_id)
	{
		this.move_sound_id = sound_id;
	}
	
	public int getSoundID()
	{
		return this.move_sound_id;
	}
	
	
	public Player(String nickname, int player_symbol) throws Exception
	{   
		
		if (player_symbol!=Player.CROSS && player_symbol!=Player.CIRCLE)
			throw new Exception("Invalid Symbol Code for player:" + this.nickname);
		this.player_symbol = player_symbol;
		
		if (nickname==null)
		{
			this.nickname = this.player_symbol==Player.CROSS ? "Cross" : "Circle";
		}
		else
			this.nickname = nickname;
	}

	public String getNickname() {
		return nickname;
	}
	
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	 
	
	public int getPlayerSymbol() {
		return this.player_symbol;
	}
	
	
}
